//
//  LHBaseTableViewCell.m
//  EPA
//
//  Created by 卢浩 on 16/4/18.
//  Copyright © 2016年 卢浩. All rights reserved.
//

#import "LHBaseTableViewCell.h"

@implementation LHBaseTableViewCell

+ (instancetype)cellWithTableView:(UITableView *)tableView Model:(LHBaseModel *)model IndexPath:(NSIndexPath *)indexPath{
    
    NSString *modelName = NSStringFromClass([model class]);
    
    if ([modelName isEqualToString:@"LHTopicsModel"]) {
        NSString *cellIdenifier = @"LHTopicsTableViewCell";
//        NSLog(@"%@",cellIdenifier);
        LHBaseTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdenifier forIndexPath:indexPath];
        [cell setModel:model];
        return cell;
        
    }else if ([modelName isEqualToString:@"LHProductsModel"]){
        NSString *cellIdenifier = @"LHProductsTableViewCell";
//        NSLog(@"%@",cellIdenifier);
        LHBaseTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdenifier forIndexPath:indexPath];
        [cell setModel:model];
        return cell;
    }else if([modelName isEqualToString:@"LHRadioModel"]){
        NSString *cellIdenifier = @"LHRadioTableViewCell";
        LHBaseTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdenifier forIndexPath:indexPath];
        [cell setModel:model];
        return cell;
    }
    
    return nil;
}

- (void)setModel:(LHBaseModel *)model{
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
